﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled 1</title>
<script type="text/javascript" src="jmin.js"></script>
<style type="text/css">
td {
	vertical-align:top;
}
</style>
</head>

<body style="font-family:Arial, Helvetica, sans-serif;">

<table style="width: 100%" border="1">
	<tr>
		<td colspan="2"><h1>jMin Javascript Library</h1></td>
	</tr>
	<tr>
		<td><h4>选择器#ID</h4></td>
		<td>&lt;span id=&quot;id_01&quot;&gt;<span id="id_01">Text</span>&lt;/span&gt;<br />
		<input type="button" onclick="jMin('#id_01').style.color='red'" value='jMin("#t001").style.color="red"' /></td>
	</tr>
	<tr>
		<td><h4>选择器.CLASS</h4></td>
		<td>&lt;span class=&quot;class_01&quot;&gt;<span class="class_01">Text</span>&lt;/span&gt;<br />
		<input type="button" onclick="jMin('.class_01')[0].style.color='red'" value='jMin(".class_01")[0].style.color="red"' /></td>
	</tr>
	<tr>
		<td><h4>选择器TagName</h4></td>
		<td>&lt;del&gt;<del>Text</del>&lt;/del&gt;<br />
		<input type="button" onclick="jMin('del')[0].style.color='red'" value='jMin("del")[0].style.color="red"' /></td>
	</tr>
	<tr>
		<td><h4>选择器#ID,.CLASS,TagName</h4></td>
		<td>&lt;span id=&quot;id_02&quot;&gt;<span id="id_02">&lt;span class=&quot;class_02 class_03&quot;&gt;<span class="class_02 class_03">&lt;del&gt;<del>Text</del>&lt;/del&gt;</span>&lt;/span&gt;</span>&lt;/span&gt;<br />
		<input type="button" onclick="jMin('#id_02').getElementsByClassName('class_03 class_02')[0].getElementsByTagName('DEL')[0].style.color='red'" value="jMin('#id_02').getElementsByClassName('class_03 class_02')[0].getElementsByTagName('DEL')[0].style.color='red'" /></td>
	</tr>
	<tr>
		<td><h4>String.trim</h4></td>
		<td>&lt;input type=&quot;text&quot; id=&quot;id_03&quot; value=&quot;<input type="text" id="id_03" value="" />&quot; 
		/&gt;<br />
<script type="text/javascript">
var str = new String("      Text");
jMin(str);
//jMin("#id_03").value = str;
//jMin("#id_03").value = str.trim();
</script>&lt;script type=&quot;text/javascript&quot;&gt;<br />
		var str = new String(&quot;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Text&quot;);<br />
		jMin(str);<br />
		jMin(&quot;#id_03&quot;).value = str;<br />
		jMin(&quot;#id_03&quot;).value = str.trim();<br />
		&lt;/script&gt;
		<br />
		<input type="button" onclick='jMin("#id_03").value = str;' value='jMin("#id_03").value = str;' />
		<input type="button" onclick='jMin("#id_03").value = str.trim();' value='jMin("#id_03").value = str.trim();' />
		<input type="button" onclick='jMin("#id_03").value = jMin.trim("          Text");' value='jMin("#id_03").value = jMin.trim("          Text");' />
		<input type="button" onclick='jMin("#id_03").value = jMin.trim();' value='jMin("#id_03").value = jMin.trim();' />
		</td>
	</tr>
	<tr>
		<td><h4>Array.del</h4></td>
		<td>&lt;span id=&quot;id_04&quot;&gt;[<span id="id_04">0,1,2,3,4,5,6</span>]&lt;/span&gt;<br />
<script type="text/javascript">
var arr=[0,1,2,3,4,5,6];
jMin(arr);
//jMin("#id_04").innerHTML = arr.del(2).join(",");
//jMin("#id_04").innerHTML = arr.join(",");
</script> 
&lt;script type=&quot;text/javascript&quot;&gt;<br />
		var arr=[0,1,2,3,4,5,6];<br />
		jMin(arr);<br />
		//jMin(&quot;#id_04&quot;).innerHTML = arr.del(2).join(&quot;,&quot;);<br />
		//jMin(&quot;#id_04&quot;).innerHTML = arr.join(&quot;,&quot;);<br />
		&lt;/script&gt;
		<br />
		<input type="button" onclick='jMin("#id_04").innerHTML = arr.del(2).join(",");' value='jMin("#id_04").innerHTML = arr.del(2).join(",");' />
		<input type="button" onclick='jMin("#id_04").innerHTML = arr.join(",");' value='jMin("#id_04").innerHTML = arr.join(",");' /></td>
	</tr>
	<tr>
		<td><h4>Date.fmt</h4></td>
		<td>

<span>&lt;span id=&quot;id_05&quot;&gt;<span id="id_05">1970-01-01 00:00</span>&lt;/span&gt;<br />
<script type="text/javascript">
var date = new Date();    
jMin(date);
//jMin("#id_05").innerHTML = date.fmt("yyyy-MM-dd hh:mm:ss"));
</script> 
&lt;script type=&quot;text/javascript&quot;&gt;<br />
		var date = new Date();&nbsp;&nbsp;&nbsp;&nbsp;</span><br/>
		<span>jMin(date);<br />
		//jMin(&quot;#id_05&quot;).innerHTML = date.fmt(&quot;yyyy-MM-dd HH:mm:ss&quot;));<br />
		&lt;/script&gt;<br />
		<input type="button" onclick='jMin("#id_05").innerHTML = date.fmt("yyyy-MM-dd HH:mm:ss");' value='jMin("#id_05").innerHTML = date.fmt("yyyy-MM-dd HH:mm:ss"));' />
		&nbsp;</span>

</td>
	</tr>
	<tr>
		<td><h4>HTMLElement.insertAfter</h4></td>
		<td>&lt;span id=&quot;id_06&quot;&gt;<span id="id_06"><span id="id_07">&lt;span id=&quot;id_07&quot;&gt;id_07&lt;/span&gt;</span>
		<span id="id_08">&lt;span id=&quot;id_08&quot;&gt;id_08&lt;/span&gt;</span></span>&lt;/span&gt;<br />

<span>&lt;script type=&quot;text/javascript&quot;&gt;<br />
		//jMin(&quot;#id_06&quot;).insertAfter(jMin(&quot;#id_07&quot;),jMin(&quot;#id_08&quot;));<br />
		&lt;/script&gt;<br />
<script type="text/javascript">
function inAfter(){
	var id_06 = jMin("#id_06");
	var id_07 = jMin("#id_07");
	var id_08 = jMin("#id_08");
	id_08.insertAfter(id_07);
}
<!--
//-->
</script>
		<input type="button" onclick='inAfter()' value='jMin("#id_08").insertAfter(jMin("#id_07"));' />
		<input type="button" onclick='jMin("#id_06").insertBefore(jMin("#id_07"),jMin("#id_08"));' value='jMin("#id_06").insertAfter(jMin("#id_07"),jMin("#id_08"));' />
		<input type="button" onclick='jMin("#id_06").insertBefore(jMin("#id_08"),jMin("#id_07"));' value='jMin("#id_06").insertAfter(jMin("#id_08"),jMin("#id_07"));' />
		</span></td>
	</tr>
	<tr>
		<td><h4>HTMLElement.attachEvent</h4><h4>HTMLElement.addEventListener</h4>&nbsp;</td>
		<td><span id="id_09" onclick="">&lt;span id=&quot;id_09&quot;&gt;id_09&lt;/span&gt;</span><br/>
<script type="text/javascript">
<!--
function id09(){
	alert(this.id);
}
//-->
</script>
		<input type="button" onclick='jMin("#id_09").attachEvent("onclick",function(){alert(123);})' value='jMin("#id_09").attachEvent("onclick",function(){alert("abc");})' />
		<input type="button" onclick='jMin("#id_09").addEventListener("click",function(){alert(123);},false)' value='jMin("#id_09").addEventListener("onclick",function(){alert("abc");},false)' /></td>
	</tr>
	<tr>
		<td><h4>HTMLElement.getAttr</h4><h4>HTMLElement.setAttr</h4><h4>HTMLElement.delAttr</h4></td>
		<td><span id="id_10" onclick="alert(jMin.getEvent().srcElement.id)">&lt;span id=&quot;id_10&quot;&gt;id_10&lt;/span&gt;</span><br/>
			<input type="button" onclick='alert(jMin("#id_10").getAttr("id"))' value='alert(jMin("#id_10").getAttr("id"))' />
			<input type="button" onclick='jMin("#id_10").setAttr("id","id10")' value='jMin("#id_10").setAttr("id","id10")' />
			<input type="button" onclick='alert(jMin("#id10").getAttr("id"))' value='alert(jMin("#id_10").getAttr("id"))' />
			<input type="button" onclick='jMin("#id10").delAttr("id")' value='jMin("#id10").delAttr("id")' /></td>
	</tr>
	<tr>
		<td><h4>jMin.trim</h4></td>
		<td>&lt;input type=&quot;text&quot; id=&quot;id_11&quot; value=&quot;<input type="text" id="id_11" value="" />&quot; 
		/&gt;<br />
		<br />
		<input type="button" onclick='jMin("#id_11").value = "          Text";' value='jMin("#id_11").value = "          Text";' />
		<input type="button" onclick='jMin("#id_11").value = new String("          Text");' value='jMin("#id_11").value = new String("          Text");' />
		<input type="button" onclick='jMin("#id_11").value = jMin.trim("          Text");' value='jMin("#id_11").value = jMin.trim("          Text");' />
		<input type="button" onclick='jMin("#id_11").value = jMin.trim(new String("          Text"));' value='jMin("#id_11").value = jMin.trim(new String("          Text"));' />
		<input type="button" onclick='jMin("#id_11").value = jMin.trim();' value='jMin("#id_11").value = jMin.trim();' />
		</td>
	</tr>
	<tr>
		<td><h4>jMin.clone&nbsp;</h4></td>
		<td>&lt;span id=&quot;id_12&quot;&gt;<span id="id_12">id_12</span>&lt;/span&gt;<br />
<script type="text/javascript">
var obj1={"id":"id_12","target":jMin("#id_12")}; 
var obj2=jMin.clone(obj1);
//jMin("#id_12").innerHTML="obj1.id="+obj1.id;
//jMin("#id_12").innerHTML="obj2.id="+obj2.id;
//obj2.target.innerHTML="obj2.target="+obj2.target.tagName;
//obj1.target.innerHTML="obj1.target="+obj1.target.tagName;
</script> &lt;script type=&quot;text/javascript&quot;&gt;<br />
		var obj1={&quot;id&quot;:&quot;id_12&quot;,&quot;target&quot;:jMin(&quot;#id_12&quot;)};<br />
		var obj2=jMin.clone(obj1);<br />
		jMin(&quot;#id_12&quot;).innerHTML=&quot;obj1.id=&quot;+obj1.id;<br />
		jMin(&quot;#id_12&quot;).innerHTML=&quot;obj2.id=&quot;+obj2.id;<br />
		obj2.target.innerHTML=&quot;obj2.id=&quot;+obj2.id;<br />
		&lt;/script&gt;
		<br />
		<input type="button" onclick='jMin("#id_12").innerHTML="obj1.id="+obj1.id;' value='jMin("#id_12").innerHTML="obj1.id="+obj1.id;' />
		<input type="button" onclick='jMin("#id_12").innerHTML="obj2.id="+obj2.id;' value='jMin("#id_12").innerHTML="obj2.id="+obj2.id;' />
		<input type="button" onclick='obj2.target.innerHTML="obj2.target="+obj2.target.tagName;' value='obj2.target.innerHTML="obj2.target="+obj2.target.tagName;' />
		<input type="button" onclick='obj1.target.innerHTML="obj1.target="+obj1.target.tagName;' value='obj1.target.innerHTML="obj1.target="+obj1.target.tagName;' /></td>

	</tr>
	<tr>
		<td><h4>jMin.getEvent&nbsp;</h4></td>
		<td>
		
		&lt;span id=&quot;id_13&quot;&gt;<span id="id_13">id_13</span>&lt;/span&gt;<br />
		<input type="button" onclick='jMin("#id_13").innerHTML=jMin.getEvent().target.value;' value='jMin("#id_13").innerHTML=jMin.getEvent().target.value;' />
		<input type="button" onclick='jMin("#id_13").innerHTML=jMin.getEvent().srcElement.value;' value='jMin("#id_13").innerHTML=jMin.getEvent().srcElement.value;' /></td>
	</tr>
	<tr>
		<td><h4>jMin.ready&nbsp;</h4></td>
		<td>&lt;span id=&quot;id_14&quot;&gt;<span id="id_14">id_14</span>&lt;/span&gt;<br />
<script type="text/javascript">
jMin.ready(function(){
	jMin("#id_14").innerHTML = "jMin.ready(fn01)";
});
jMin.ready(function(){
	jMin("#id_14").innerHTML+="jMin.ready(fn02)";
});
jMin.ready(function(){
	jMin("#id_14").innerHTML+="jMin.ready(fn03)";
});
</script> &lt;script type=&quot;text/javascript&quot;&gt;<br />
		jMin.ready(function(){<br />
&nbsp;&nbsp;&nbsp;&nbsp; jMin(&quot;#id_14&quot;).innerHTML =&quot;jMin.ready(fn01)&quot;;<br />
		});<br />
		jMin.ready(function(){<br />
&nbsp;&nbsp;&nbsp;&nbsp; jMin(&quot;#id_14&quot;).innerHTML+=&quot;jMin.ready(fn02)&quot;;<br />
		});<br />
		jMin.ready(function(){<br />
&nbsp;&nbsp;&nbsp;&nbsp; jMin(&quot;#id_14&quot;).innerHTML+=&quot;jMin.ready(fn03)&quot;;<br />
		});<br />
		&lt;/script&gt;
		<br />
		<input type="button" onclick='jMin.ready(function(){jMin("#id_14").innerHTML+="jMin.ready(fn04)";})' value='jMin.ready(function(){jMin("#id_14").innerHTML+="jMin.ready(fn04)";})' />
		<input type="button" onclick='jMin.ready(function(){jMin("#id_14").innerHTML+="jMin.ready(fn05)";})' value='jMin.ready(function(){jMin("#id_14").innerHTML+="jMin.ready(fn05)";})' /></td>
	</tr>
	<tr>
		<td><h4>jMin.loadjs</h4></td>
		<td><div id="load">load</div>&nbsp;
<script type="text/javascript">
<!--
jMin.loadjs("0.js")
jMin.loadjs("1.js")
jMin.loadjs("2.js")
jMin.loadjs("3.js")
jMin.loadjs("4.js")
jMin.loadjs("5.js")
jMin.loadjs("6.js")
jMin.loadjs("7.js")
jMin.loadjs("8.js")
jMin.loadjs("9.js")

function loadjs10(){
	jMin.loadjs("0.js")
	jMin.loadjs("1.js")
	jMin.loadjs("2.js")
	jMin.loadjs("3.js")
	jMin.loadjs("4.js")
	jMin.loadjs("5.js")
	jMin.loadjs("6.js")
	jMin.loadjs("7.js")
	jMin.loadjs("8.js")
	jMin.loadjs("9.js")
}
//-->
</script>		
		
		<input type="button" onclick='for(var i=0;i<20;i++){loadjs10();}' value='for(var i=0;i<10;i++){jMin.loadjs(i%10+".js")}' />		
		
		<input type="button" onclick='jMin.loadjs("1.js",function(){jMin.loadjs("0.js")})' value='jMin.loadjs("1.js",function(){jMin.loadjs("0.js")})' /></td>
	</tr>
	<tr>
		<td><h4>jMin.loadcss</h4></td>
		<td><div id="load">load</div>&nbsp;
<script type="text/javascript">
<!--
jMin.loadcss("0.js")
jMin.loadcss("1.js")
jMin.loadcss("2.js")
jMin.loadcss("3.js")
jMin.loadcss("4.js")
jMin.loadcss("5.js")
jMin.loadcss("6.js")
jMin.loadcss("7.js")
jMin.loadcss("8.js")
jMin.loadcss("9.js")

function loadcss10(){
	jMin.loadcss("0.js")
	jMin.loadcss("1.js")
	jMin.loadcss("2.js")
	jMin.loadcss("3.js")
	jMin.loadcss("4.js")
	jMin.loadcss("5.js")
	jMin.loadcss("6.js")
	jMin.loadcss("7.js")
	jMin.loadcss("8.js")
	jMin.loadcss("9.js")
}
//-->
</script>		
		
		<input type="button" onclick='for(var i=0;i<20;i++){loadcss10();}' value='for(var i=0;i<10;i++){jMin.loadcss(i%10+".css")}' />		
		
		<input type="button" onclick='jMin.loadcss("1.js",function(){jMin.loadcss("0.js")})' value='jMin.loadcss("1.css",function(){jMin.loadcss("0.css")})' /></td>
	</tr>
	<tr>
		<td><h4>jMin.setcookie</h4><h4>jMin.getcookie</h4><h4>jMin.delcookie</h4></td>
		<td>
		<input type="button" onclick='jMin.setcookie("login","yes",5000);' value='var d = new Date();d.setTime(d.getTime()+5);jMin.setcookie("login","yes",d.getTime());' />
		<input type="button" onclick='alert(jMin.getcookie("login"));' value='alert(jMin.getcookie("login"));' />
		<input type="button" onclick='jMin.delcookie("login");' value='jMin.delcookie("login");' />
		</td>
	</tr>
	<tr>
		<td><h4>jMin.ajax</h4></td>
		<td>&lt;span id=&quot;id_15&quot;&gt;<span id="id_15">id_15</span>&lt;/span&gt;<br />
<script type="text/javascript">
var id15 = jMin("#id_15").ajax = new jMin.ajax();
id15.parseResults=function() {
	jMin("#id_15").innerHTML = id15.xmlHttp.responseText;
}
</script> &lt;script type=&quot;text/javascript&quot;&gt;<br />
		var myajax = new jMin.ajax();<br />
		myajax.parseResults=function() {<br />
		jMin(&quot;#id_15&quot;).innerHTML = this.xmlHttp.responseText;<br />
		}<br />
		myajax.doRequestUsingPOST(&quot;http://127.0.0.1:8018/htll.html?&quot;);<br />
		//doRequestUsingPOST(&quot;panel_dic.php?word=&quot;+word+&quot;&amp;lang=en2ch&amp;action=sug&quot;);<br />
		&lt;/script&gt;
		<br />
		<input type="button" onclick='id15.doRequestUsingGET("hello.php?name=myy&age=23");' value='id15.doRequestUsingPOST("http://www.5imemo.copm/hello.php?name=myy&age=23");' />
		<input type="button" onclick='id15.doRequestUsingPOST("hello.php?name=myy&age=26","name=myyang&age=23");' value='id15.doRequestUsingPOST("http://www.5imemo.copm/hello.php","name=myy&age=23");' /></td>
	</tr>
	<tr>
		<td><h4>&nbsp;</h4></td>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td><h4>&nbsp;</h4></td>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td><h4>&nbsp;</h4></td>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td><h4>&nbsp;</h4></td>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td><h4>&nbsp;</h4></td>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td><h4>&nbsp;</h4></td>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td><h4>&nbsp;</h4></td>
		<td>&nbsp;</td>
	</tr>
</table>

</body>

</html>
